\(\int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx\) [16]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 40, antiderivative size = 43 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {2 \sec (e+f x) \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c f g} \]

[Out]

2*sec(f*x+e)*(g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/c/f/g

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {3009, 12, 30} \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {2 \sec (e+f x) \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}{c f g} \]

[In]

Int[Sqrt[a + a*Sin[e + f*x]]/(Sqrt[g*Sin[e + f*x]]*(c - c*Sin[e + f*x])),x]

[Out]

(2*Sec[e + f*x]*Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(c*f*g)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 3009

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) +
(f_.)*(x_)])), x_Symbol] :> Dist[-2*(b/f), Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[g*S
in[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && EqQ[a^
2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {(2 a) \text {Subst}\left (\int \frac {1}{c g x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{f} \\ & = -\frac {(2 a) \text {Subst}\left (\int \frac {1}{x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{c f g} \\ & = \frac {2 \sec (e+f x) \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c f g} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.55 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.93 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {2 \sqrt {a (1+\sin (e+f x))} \tan (e+f x)}{c f \sqrt {g \sin (e+f x)}} \]

[In]

Integrate[Sqrt[a + a*Sin[e + f*x]]/(Sqrt[g*Sin[e + f*x]]*(c - c*Sin[e + f*x])),x]

[Out]

(2*Sqrt[a*(1 + Sin[e + f*x])]*Tan[e + f*x])/(c*f*Sqrt[g*Sin[e + f*x]])

Maple [A] (verified)

Time = 2.86 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.86

method result size
default \(\frac {2 \tan \left (f x +e \right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}{c f \sqrt {g \sin \left (f x +e \right )}}\) \(37\)

[In]

int((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/c/f*tan(f*x+e)*(a*(1+sin(f*x+e)))^(1/2)/(g*sin(f*x+e))^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.95 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {2 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{c f g \cos \left (f x + e\right )} \]

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

2*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))/(c*f*g*cos(f*x + e))

Sympy [F]

\[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=- \frac {\int \frac {\sqrt {a \sin {\left (e + f x \right )} + a}}{\sqrt {g \sin {\left (e + f x \right )}} \sin {\left (e + f x \right )} - \sqrt {g \sin {\left (e + f x \right )}}}\, dx}{c} \]

[In]

integrate((a+a*sin(f*x+e))**(1/2)/(c-c*sin(f*x+e))/(g*sin(f*x+e))**(1/2),x)

[Out]

-Integral(sqrt(a*sin(e + f*x) + a)/(sqrt(g*sin(e + f*x))*sin(e + f*x) - sqrt(g*sin(e + f*x))), x)/c

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 309 vs. \(2 (39) = 78\).

Time = 0.31 (sec) , antiderivative size = 309, normalized size of antiderivative = 7.19 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=-\frac {\frac {4 \, {\left ({\left (\frac {3 \, \sqrt {2} \sqrt {a} \sqrt {g} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sqrt {2} \sqrt {a} \sqrt {g} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} \sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \frac {2 \, {\left (\frac {3 \, \sqrt {2} \sqrt {a} \sqrt {g} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sqrt {2} \sqrt {a} \sqrt {g} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}}{\sqrt {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}\right )}}{c g - \frac {c g \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \frac {2 \, \sqrt {2} \sqrt {a} \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{\frac {3}{2}} + \frac {3 \, \sqrt {2} \sqrt {a} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}{c \sqrt {g}} - \frac {2 \, \sqrt {2} \sqrt {a} \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{\frac {3}{2}} - \frac {3 \, \sqrt {2} \sqrt {a} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}{c \sqrt {g}}}{12 \, f} \]

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

-1/12*(4*((3*sqrt(2)*sqrt(a)*sqrt(g)*sin(f*x + e)/(cos(f*x + e) + 1) - sqrt(2)*sqrt(a)*sqrt(g)*sin(f*x + e)^2/
(cos(f*x + e) + 1)^2)*sqrt(sin(f*x + e)/(cos(f*x + e) + 1)) - 2*(3*sqrt(2)*sqrt(a)*sqrt(g)*sin(f*x + e)/(cos(f
*x + e) + 1) + sqrt(2)*sqrt(a)*sqrt(g)*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)/sqrt(sin(f*x + e)/(cos(f*x + e) +
1)))/(c*g - c*g*sin(f*x + e)/(cos(f*x + e) + 1)) - (2*sqrt(2)*sqrt(a)*(sin(f*x + e)/(cos(f*x + e) + 1))^(3/2)
+ 3*sqrt(2)*sqrt(a)*sin(f*x + e)/(cos(f*x + e) + 1))/(c*sqrt(g)) - (2*sqrt(2)*sqrt(a)*(sin(f*x + e)/(cos(f*x +
 e) + 1))^(3/2) - 3*sqrt(2)*sqrt(a)*sin(f*x + e)/(cos(f*x + e) + 1))/(c*sqrt(g)))/f

Giac [F]

\[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int { -\frac {\sqrt {a \sin \left (f x + e\right ) + a}}{{\left (c \sin \left (f x + e\right ) - c\right )} \sqrt {g \sin \left (f x + e\right )}} \,d x } \]

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(-sqrt(a*sin(f*x + e) + a)/((c*sin(f*x + e) - c)*sqrt(g*sin(f*x + e))), x)

Mupad [B] (verification not implemented)

Time = 13.13 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.21 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {2\,\sin \left (2\,e+2\,f\,x\right )\,\sqrt {a\,\left (\sin \left (e+f\,x\right )+1\right )}}{c\,f\,\left (\cos \left (2\,e+2\,f\,x\right )+1\right )\,\sqrt {g\,\sin \left (e+f\,x\right )}} \]

[In]

int((a + a*sin(e + f*x))^(1/2)/((g*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))),x)

[Out]

(2*sin(2*e + 2*f*x)*(a*(sin(e + f*x) + 1))^(1/2))/(c*f*(cos(2*e + 2*f*x) + 1)*(g*sin(e + f*x))^(1/2))